package sjms.construction.adapter.obj;

/**
 * @ClassName:
 * @Description:
 * @Author fcb
 * @Date 2020/5/27 15:30
 */
public class AutoPlayerAdapter implements Player {

    private VideoPlayer videoPlayer;

    public AutoPlayerAdapter(){}


    @Override
    public void autoPlay(String filename) {
        if(filename.contains("mp4")){
            videoPlayer = new Mp4Player();
            videoPlayer.play(filename);
        }else if(filename.contains("mp3")){
            System.out.println("mp3");
        }
    }
}
